﻿using Tables;

namespace calculator
{
    class SymbolTable : StringTable, ISymbolTable
    {
        public SymbolTable(int size)
            : base(size * 10)
        {
            _offstr = new int[size];
        }
        protected virtual void Dispose(bool disposing)
        {
            if (!_disposed)
            {
                if (disposing)
                {
                    //disposed managed resource
                    _offstr = null;
                }
                // release unmanaged resource
            }
            _disposed = true;

            // if available, call to base class
            base.Dispose(disposing);
        }


        private bool _disposed = false;
        private HTable _htab = new HTable();
        private int[] _offstr; // Offsets of strings in buffer
        private int _size;
        private int _curId;
        private int _bufSize;
        private int _curStrOff;
    }
}
